<extend name="Public:base" />
<block name="content">
<div class="page-header">
		<h1>
			<a href="javascript:void(0)" onclick="history.go(-1)">{$breadcrumb2}</a>
			<small>
				<i class="icon-double-angle-right"></i>
				{$crumbs}
			</small>
		</h1>
	</div>
<div class="row">
	<div class="col-xs-12">
		<form class="form-horizontal"  id="validation-form" method="post" action='{$action}'>


			<input name="id" type="hidden" value="{$bank_array.bank_id|default=''}" />


			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left"> * 银行名称 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="bank_name" id="bank_name" value="{$bank_array.bank_name|default=''}" class="col-xs-10 col-sm-5" type="text">
				</div>
			</div>
			</div>

			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">  * 状态</label>
				<div class="col-sm-10">
					<div class="clearfix">
							<label class="radio-inline"><input <?php if($bank_array['status'] == '1'){echo ' checked="checked"';}else{if(empty($bank_array)){echo ' checked="checked"';}} ?> type="radio" value="1" name="status">开启</label>
							<label class="radio-inline"><input <?php if($bank_array['status'] == '0'){echo ' checked="checked"';} ?> type="radio" value="0" name="status">关闭</label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left"> </label>
				<div class="col-sm-10">
					<input name="send" type="submit" value="提交" class="btn btn-primary btn-sm radius5" />
				</div>
			</div>
		</form>
	</div>
</div>
</block>
<block name="javascript">
<script src="__JS__/jquery.validate.min.js"></script>
<script>
$(function(){

	$('#validation-form').validate({
			errorElement: 'div',
			errorClass: 'help-block',
			focusInvalid: false,
			rules: {
				name: {
					required: true,
					minlength: 2
				}
			},

			messages: {

				name: {
					required: "必填",
					minlength: "不得少于2个字"
				}

			},

			invalidHandler: function (event, validator) { //display error alert on form submit
				$('.alert-danger', $('.login-form')).show();
			},

			highlight: function (e) {
				$(e).closest('.form-group').removeClass('has-info').addClass('has-error');
			},

			success: function (e) {
				$(e).closest('.form-group').removeClass('has-error').addClass('has-info');
				$(e).remove();
			},

			errorPlacement: function (error, element) {
				 error.insertAfter(element.parent());
			},

		});

});
</script>
</block>